<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">

<title>My JSP 'ShowAllUser.jsp' starting page</title>

<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->

<script type="text/javascript">
function check(){

 var groupname=document.getElementById('groupname');


 if(!groupname.value){
 alert("请输入工作组名!");
 groupname.focus();
 return false;
 }
 if(groupname.value.length>15){
  alert(groupname.value.length+"工作组名长度超出15!");
 groupname.focus();
 return false;
 }
 }
</script>
<style type="text/css">
table.table {
	font-family: verdana,arial,sans-serif;
	font-size:15px;
	color:#333333;
	border-width: 1px;
	border-color: #999999;
	border-collapse: collapse;
	text-align:center;
	
}
table.table th {
	background:#b5cfd2 url('img/cell-blue.jpg');
	border-width: 1px;
	padding: 8px;
	border-style: solid;
	border-color: #999999;
	text-align:center;
}
table.table td {
	background:#dcddc0 url('img/cell-grey.jpg');
	border-width: 1px;
	padding: 8px;
	border-style: solid;
	border-color: #999999;
	text-align:center;
	
}
h2{ 
  background-color:  white  ;    
  color:#A0522D;    
  padding:10px 100px;  
  } 
</style>

</head>

<body>

	<div align=center>
		<form action="addworkgroup" method="post" onsubmit="return check()">
		<div>	<h2>工作组名：<input type="text" id="groupname"
				name="workgroupBean.workgroupName" /><input type="submit" value="确认创建" /></h2></div>
			<table class="table table-hover" style="width:50%">

				<tr border=1>
					<th>选择</th>
					<th>用户名</th>
					<th>姓名</th>


				</tr>

				<s:iterator value="addWGUserList" id="user">
					<tr>
						<td><input type="checkbox" name="selectuser"
							value="<s:property value="#user.username" />"></td>
						<td><s:property value="#user.username" /></td>
						<td><s:property value="#user.name" /></td>

					</tr>
				</s:iterator>
				


			</table>
		</form>
	</div>
</body>
</html>